package cn.com.git.workflow.config.redis;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 数据源配置文件实体类
 */
@Component
@ConfigurationProperties(prefix = "spring.redis")
@Profile("dev")
@PropertySource("classpath:profiles/dev/redis-config.properties")
public class LocalRedisConfig implements RedisProperties {

    private Integer database;
    private Long timeOut;
    private Integer maxActive;
    private Integer maxIdle;
    private Integer minIdle;
    private Integer maxWait;
    private String host;
    private Integer port;
    private Boolean ssl;
    private String password;

    @Override
    public Integer getDatabase() {
        return database;
    }
    @Override
    public Long getTimeOut() {
        return timeOut;
    }
    @Override
    public Integer getMaxActive() {
        return maxActive;
    }
    @Override
    public Integer getMaxIdle() {
        return maxIdle;
    }
    @Override
    public Integer getMinIdle() {
        return minIdle;
    }
    @Override
    public Integer getMaxWait() {
        return maxWait;
    }
    @Override
    public String getHost() {
        return host;
    }
    @Override
    public Integer getPort() {
        return port;
    }
    @Override
    public Boolean getSsl() {
        return ssl;
    }
    @Override
    public String getPassword() {
        return password;
    }

    public void setDatabase(Integer database) {
        this.database = database;
    }

    public void setTimeOut(Long timeOut) {
        this.timeOut = timeOut;
    }

    public void setMaxActive(Integer maxActive) {
        this.maxActive = maxActive;
    }

    public void setMaxIdle(Integer maxIdle) {
        this.maxIdle = maxIdle;
    }

    public void setMinIdle(Integer minIdle) {
        this.minIdle = minIdle;
    }

    public void setMaxWait(Integer maxWait) {
        this.maxWait = maxWait;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public void setSsl(Boolean ssl) {
        this.ssl = ssl;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
